﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/AdminSchedule.master" AutoEventWireup="true" CodeFile="FlightEdit.aspx.cs" Inherits="Pages_FlightEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" Runat="Server">
	<style type="text/css">
		.edit-form { overflow: hidden; clear: both;}
		.edit-row { width: 500px; margin: 0px auto;}
		.edit-label { width: 200px; float:left;}
		.edit-control { width: 300px; float: left;}
		.ui-modal-overlay 
		{
			background-color: Black;
			filter: alpha(opacity=50);
			opacity: .5;
		}
		.modaldiv
		{
			overflow: hidden;
			border: solid 2px black;
			padding: 5px;
		}
	</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContent" Runat="Server">
	<div>
		<a href='<%= ResolveUrl("~/Pages/Flight.aspx") %>'>Вернуться к списку рейсов</a>
	</div>
	<div class="edit-form">
		<div class="edit-row">
			<div class="edit-label">Маршрут</div>
			<div class="edit-control">
				<asp:DropDownList runat="server" ID="ddlRoute" DataTextField="Name" DataValueField="Id" />
			</div>
		</div>
		<div class="edit-row">
			<div class="edit-label">Автобус</div>
			<div class="edit-control">
				<asp:DropDownList runat="server" ID="ddlBus" DataTextField="Name" DataValueField="Id" />
			</div>
		</div>
		<%--<asp:UpdatePanel runat="server" ID="upRoute" UpdateMode="Conditional">
			<ContentTemplate>
				<div class="edit-row">
					<div class="edit-label">Остановка отправления</div>
					<div class="edit-control">
						<asp:Label runat="server" ID="lbSourceStation" />
						<asp:HiddenField runat="server" ID="hfSourceStation" />
						<asp:LinkButton runat="server" ID="lkbEditSourceStation" Text="[Изменить]" 
										OnClick="OnEditStation" CommandName="SourceStation" />
					</div>
				</div>
				<div class="edit-row">
					<div class="edit-label">Остановка прибытия</div>
					<div class="edit-control">
						<asp:Label runat="server" ID="lbTargetStation" />
						<asp:HiddenField runat="server" ID="hfTargetStation" />
						<asp:LinkButton runat="server" ID="lkbEditTargetStation" Text="[Изменить]" 
										OnClick="OnEditStation" CommandName="TargetStation" />
					</div>
				</div>
				<div class="edit-row">
					<div class="edit-label">Промежуточные остановки</div>
					<div class="edit-control">
						<asp:Repeater runat="server" ID="rptRouteStation">
							<ItemTemplate>
								<%# Eval("station.Name") %>
								<asp:LinkButton runat="server" ID="lkbEditRouteStation" Text="[Удалить]" CommandArgument='<%# Eval("station.Id") %>'
												OnClick="OnDeleteStation" />
								<br />
							</ItemTemplate>
						</asp:Repeater>
						<asp:LinkButton runat="server" ID="lkbAddRouteStation" Text="Добавить" 
										OnClick="OnEditStation" CommandName="RouteStation" />
					</div>
				</div>
			</ContentTemplate>
		</asp:UpdatePanel>--%>
	</div>
	<div style="text-align:center;">
		<asp:Button runat="server" ID="btnSave" Text="Сохранить" OnClick="OnFlightSave" />
		<asp:Button runat="server" ID="btnCancel" Text="Отменить" OnClick="OnCancel" />
	</div>
</asp:Content>

